package chapter08.chapter8_3_ChangeValueToReference.ver01;

public class Customer {

    private final String _name;

    // 改为私有
    private Customer(String name) {
        _name = name;
    }

    // 增加工厂方法
    public static Customer create(String name) {
        return new Customer(name);
    }

    public String getName() {
        return _name;
    }
}
